﻿using System.IO;

namespace NWebMock
{
    public interface IHttpPostedFile
    {
        #region Properties

        /// <summary>
        /// Gets the size of an uploaded file, in bytes.
        /// </summary>
        int ContentLength { get; }

        /// <summary>
        /// Gets the MIME content type of a file sent by a client.
        /// </summary>
        string ContentType { get; }

        /// <summary>
        /// Gets the fully qualified name of the file on the client.
        /// </summary>
        string FileName { get; }

        /// <summary>
        /// Gets a Stream object that points to an uploaded file to prepare for reading the contents of the file.
        /// </summary>
        Stream InputStream { get; }

        #endregion

        #region Methods

        /// <summary>
        /// Saves the contents of an uploaded file.
        /// </summary>
        /// <param name="filename">The name of the saved file. </param>
        void SaveAs(string filename);

        #endregion
    }
}
